﻿<local:PageBase 
    x:Class="TriathlonChecklist.AddItemPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:TriathlonChecklist"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Margin="0,10,0,0">

    <local:PageBase.Resources>
        <DataTemplate x:Name="lpkCategoryTemplate">
            <TextBlock Text="{Binding Name}" FontSize="32" TextAlignment="Left" Foreground="Black"/>
        </DataTemplate>
        <DataTemplate x:Name="lpkFullCategoryTemplate">
            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                <TextBlock Text="{Binding Name}" FontSize="32" TextAlignment="Center" Margin="0,10,0,10" Foreground="White"/>
            </Grid>
        </DataTemplate>
    </local:PageBase.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,-32,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"><!--Margin="12,17,0,28"-->
            <TextBlock x:Name="ApplicationTitle" Text="{Binding AppResources.ApplicationName, Source={StaticResource InternationalizationHelper}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="add an item" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Foreground="#FF2E74A7"/>
        </StackPanel>
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <TextBlock Text="name (30 characters maximum)" FontSize="18.667" TextAlignment="Left" Margin="12,0" RenderTransformOrigin="0.5,0.485" Height="25" VerticalAlignment="Top" Foreground="#FF999999"/>
            <TextBox x:Name="NameTextBox" Text="{Binding Name, Mode=TwoWay}" Height="72" VerticalAlignment="Top" Margin="0,16,0,0">
                <TextBox.InputScope>
                    <InputScope>
                        <InputScopeName NameValue="Text" />
                    </InputScope>
                </TextBox.InputScope>
            </TextBox>
            <TextBlock Text="category" FontSize="18.667" TextAlignment="Left" Margin="12,88,12,0" RenderTransformOrigin="0.5,0.485" Height="25" VerticalAlignment="Top" Foreground="#FF999999"/>
            <toolkit:ListPicker x:Name="lpkCategory" ItemsSource="{Binding Categories}" SelectedItem="{Binding SelectedCategory, Mode=TwoWay}" ExpansionMode="ExpansionAllowed" ItemTemplate="{StaticResource lpkCategoryTemplate}" FullModeItemTemplate="{StaticResource lpkFullCategoryTemplate}" Margin="12,109,12,96" d:LayoutOverrides="GridBox" BorderThickness="3,3,3,12" Foreground="Black" SelectionMode="Single" />
            <!--<Button Content="" Command="{Binding AddItemCommand}" Margin="140,0,140,113" FontSize="32" BorderThickness="0" Height="87" VerticalAlignment="Bottom">
            	<Button.Background>
                    <ImageBrush ImageSource="/Triathlon Checklist;component/Images/save02.png" Stretch="None"/>
            	</Button.Background>
            </Button>-->
        </Grid>
    </Grid>
    <!--Application bar-->
    <local:PageBase.ApplicationBar>
        <shell:ApplicationBar IsMenuEnabled="True" Mode="Default" Opacity="1.0" BackgroundColor="#FF336699">
            <shell:ApplicationBar.Buttons>
                <shell:ApplicationBarIconButton x:Name="SaveBarIconButton" Text="save" IconUri="/Images/save01.png" Click="SaveBarIconButton_Click"></shell:ApplicationBarIconButton>
            </shell:ApplicationBar.Buttons>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="AboutAndHelpBarMenuItem" Text="about" Click="AboutAndHelpBarMenuItem_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </local:PageBase.ApplicationBar>
</local:PageBase>
